﻿using System;
using System.Collections.Generic;

using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using WCSY.BLL;

public partial class tempalette_Right : System.Web.UI.Page
{
    
    protected void Page_Load(object sender, EventArgs e)
    {
        if(!IsPostBack){
            fg_approveObjDetAppManager objdetm = new fg_approveObjDetAppManager();
            if (Session["userId"] != null)
            {
                string approvpsn = tool.getRoleIdByUserId(Session["userId"].ToString());
                DataTable dt = objdetm.getApprovPsnObj(approvpsn, Session["userId"].ToString());
                approvGvBind(dt);
            }
            else {
                RegisterStartupScript("check", "<script>chkLogin()</script>");
            }
           
        }
    }

    public void approvGvBind(DataTable dt) {

        this.approvGridView.DataSource = dt;
        this.approvGridView.DataBind() ;
    }
    protected void btnApprovRe_Click(object sender, EventArgs e)
    {
        fg_approveObjDetAppManager objdetm = new fg_approveObjDetAppManager();
        string approvpsn = tool.getRoleIdByUserId(Session["userId"].ToString());
        DataTable dt = objdetm.getApprovPsnObj(approvpsn, Session["userId"].ToString());
        approvGvBind(dt);
    }
}
